//
//  HWDividedIntoCell.m
//  HWPromoteProjectAPP
//
//  Created by 陈道斌 on 2020/2/19.
//  Copyright © 2020 陈道斌. All rights reserved.
//

#import "HWDividedIntoCell.h"

@interface HWDividedIntoCell()

//@property(strong,nonatomic)UILabel *userLabel; // 用户
//@property(strong,nonatomic)UILabel *zhucerenshuLabel; // 注册人数
//@property(strong,nonatomic)UILabel  *chongzhijingELabel; // 充值总额
//@property(strong,nonatomic)UILabel *shouyiLabel;  //收益
//@property(strong,nonatomic)UILabel *jiesuanLabel; // 已结算




@end

@implementation HWDividedIntoCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self setupUI];
        
        
        
    }
    
    
    return  self;
    
    
}



// 设置UI
- (void)setupUI {
    
      self.userLabel = [[UILabel alloc]initWithFrame:CGRectMake(8, 0, 62*CFLScaleValue, 46)];
      self.userLabel .text = @"xiaosoos1";
      self.userLabel .textAlignment =  NSTextAlignmentLeft;
      self.userLabel .textColor = RGB(0, 0, 0);
      self.userLabel .font = [UIFont systemFontOfSize:12];
      self.userLabel.alpha = 0.65;
      [self.contentView   addSubview: self.userLabel];
    
    
        self.zhucerenshuLabel = [[UILabel alloc]initWithFrame:CGRectMake(8+62*CFLScaleValue, 0, 62*CFLScaleValue, 46)];
          self.zhucerenshuLabel .text = @"0";
          self.zhucerenshuLabel .textAlignment =  NSTextAlignmentLeft;
          self.zhucerenshuLabel .textColor = RGB(0, 0, 0);
          self.zhucerenshuLabel .font = [UIFont systemFontOfSize:12];
          self.zhucerenshuLabel.alpha = 0.65;
          [self.contentView   addSubview: self.zhucerenshuLabel];
    
       self.chongzhijingELabel = [[UILabel alloc]initWithFrame:CGRectMake(8+62*CFLScaleValue+80*CFLScaleValue, 0, 62*CFLScaleValue, 46)];
       self.chongzhijingELabel .text = @"0";
       self.chongzhijingELabel .textAlignment =  NSTextAlignmentLeft;
       self.chongzhijingELabel .textColor = RGB(0, 0, 0);
             self.chongzhijingELabel .font = [UIFont systemFontOfSize:12];
             self.chongzhijingELabel.alpha = 0.65;
            [self.contentView   addSubview: self.chongzhijingELabel];
    
    
       self.shouyiLabel = [[UILabel alloc]initWithFrame:CGRectMake(8+62*CFLScaleValue+80*CFLScaleValue+81*CFLScaleValue, 0, 62*CFLScaleValue, 46)];
       self.shouyiLabel .text = @"0";
       self.shouyiLabel .textAlignment =  NSTextAlignmentLeft;
       self.shouyiLabel .textColor = RGB(0, 0, 0);
       self.shouyiLabel .font = [UIFont systemFontOfSize:12];
       self.shouyiLabel.alpha = 0.65;
       [self.contentView   addSubview: self.shouyiLabel];
    
    
    
        self.jiesuanLabel = [[UILabel alloc]initWithFrame:CGRectMake(8+62*CFLScaleValue+80*CFLScaleValue+81*CFLScaleValue+56*CFLScaleValue, 0, 62*CFLScaleValue, 46)];
        self.jiesuanLabel .text = @"0";
        self.jiesuanLabel .textAlignment =  NSTextAlignmentLeft;
        self.jiesuanLabel .textColor = RGB(0, 0, 0);
        self.jiesuanLabel .font = [UIFont systemFontOfSize:12];
        self.jiesuanLabel.alpha = 0.65;
        [self.contentView   addSubview: self.jiesuanLabel];
     
    
    
    
    
    

    
      for (int i = 0 ; i < 4 ; i++) {
          
          
          UIView *shuxiang = [[UIView alloc]initWithFrame:CGRectMake( 62*CFLScaleValue, 0, 1, 46)];
          shuxiang.backgroundColor = beijingyanSe;
          [self.contentView addSubview:shuxiang];
          
          if (i == 0 ) {
              
              shuxiang.frame = CGRectMake(62*CFLScaleValue , 0, 1, 46);
               
          }else if (i == 1) {
              
              shuxiang.frame = CGRectMake(62*CFLScaleValue+80*CFLScaleValue, 0, 1, 46);
          }else if (i == 2) {
              
              shuxiang.frame = CGRectMake(62*CFLScaleValue+80*CFLScaleValue+81*CFLScaleValue, 0, 1, 46);
          }else if (i == 3) {
              
              
              shuxiang.frame = CGRectMake(62*CFLScaleValue+80*CFLScaleValue+81*CFLScaleValue+56*CFLScaleValue, 0, 1, 46);
              
          }
          
          
     
      }
    

      UIView *hengxianView = [[UIView alloc]initWithFrame:CGRectMake(0, 45, kScreenW-40*CFLScaleValue, 1)];
      hengxianView.backgroundColor = RGB(245, 245, 245);
      [self.contentView addSubview:hengxianView];
    
    
       
    
    
    
    
    
     
    

    
    
}


-(void)setDataDic:(NSDictionary *)dataDic {
    
    _dataDic = dataDic;
    
//    @property(strong,nonatomic)UILabel *userLabel; // 用户
//    @property(strong,nonatomic)UILabel *zhucerenshuLabel; // 注册人数
//    @property(strong,nonatomic)UILabel  *chongzhijingELabel; // 充值总额
//    @property(strong,nonatomic)UILabel *shouyiLabel;  //收益
//    @property(strong,nonatomic)UILabel *jiesuanLabel; // 已结算
//
    
    self.userLabel.text = [NSString stringWithFormat:@"%@",dataDic[@"name"]];
    self.zhucerenshuLabel.text = [NSString stringWithFormat:@"%@",dataDic[@"number"]];
    self.chongzhijingELabel.text = [NSString stringWithFormat:@"%@",dataDic[@"money"]];
     self.shouyiLabel.text = [NSString stringWithFormat:@"%@",dataDic[@"income"]];
    self.jiesuanLabel.text = [NSString stringWithFormat:@"%@",dataDic[@"settled"]];
    
    
    
    
}

@end
